/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author 
 */
public class CekSetara {

    private int[][] matrix;

    public CekSetara(int[][] matrix) {
        this.matrix = matrix;
    }

    public int tes() {
        return 0;
    }

    public boolean isRefleksif() {
        boolean cek = true;
        for (int i = 0; i < matrix.length; i++) {
            if (matrix[i][i] == 0) {
                cek = false;
                return cek;
            }
        }
        return cek;
    }

    public boolean isIrrefleksif() {
        boolean cek = true;
        for (int i = 0; i < matrix.length; i++) {
            if (matrix[i][i] == 1) {
                cek = false;
                return cek;
            }
        }
        return cek;
    }

    public boolean isSimetri() {
        boolean cek = true;
        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                if (matrix[i][j] != matrix[j][i]) {
                    cek = false;
                    return cek;
                }
            }
        }
        return cek;
    }

    public boolean isAntiSimetri() {
        boolean cek = true;
        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                if (i != j && (matrix[i][j] == 1 && matrix[j][i] == 1)) {
                    cek = false;
                    return cek;
                }
            }
        }
        return cek;
    }

    public boolean isAsimetri() {
        boolean cek = true;
        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                if (matrix[i][j] == 1 &&  matrix[j][i] == 1) {
                    cek = false;
                    return cek;
                }
            }
        }
        return cek;
    }

    public boolean isTransitif() {
        boolean cek = true;
        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                for (int k = 0; k < matrix.length; k++) {
                    if (matrix[i][j] == 1 && matrix[j][k] == 1 && matrix[i][k] == 0) {
                        cek = false;
                        return cek;
                    }
                }
            }
        }
        return cek;
    }

    public boolean isSetara(){
        boolean setara = true;
            
        return setara;
    }

}